﻿			<script type="text/javascript" src="<?php echo base_url(); ?>resource/script/gopy.js"></script>
			<div id="content">
                <!--SHOUTBOX-->
                <div class="danhsachgopy">TRÒ CHUYỆN CHUNG</div>
                <div class="block" style="padding: 5px;">
                    <div class="shoutbox" style="height: 200px;overflow-y: scroll;" id="shoutbox">
                    </div>
                </div>
                <?php 
                    if($this->session->userdata('prie_username'))
                    {
                        echo 
                        '
                        <div class="block" style="padding: 5px;">
                        <center>
                        <form class="form-inline" role="form">
                            <div class="form-group">
                                <input type="text" class="form-control" placeholder="Nói" id="noidung">
                            </div>
                            <button type="button" class="btn btn-default" id="noi">Nói</button>
                        </form>
                        </center>
                        </div>
                        ';
                    }
                ?>
                <div class="danhsachgopy">TÌM VÀ TẠO GÓP Ý</div>
                <!--HẾT SHOUTBOX-->
                <div class="block" style="padding: 5px;">
                    <center>
                        <form class="form-inline" role="form" method="post" action="<?php echo base_url(),'gopy/timgopy';?>">
                            <a href="<?php echo base_url(),'gopy/taogopy'?>"><button type="button" class="btn btn-default">TẠO GÓP Ý</button></a>
                            &nbsp;&nbsp;&nbsp;&nbsp;
                            TÌM CHỦ ĐỀ:
                            <input type="text" class="form-control" placeholder="Chủ đề" name="chudetim">
                            &nbsp;&nbsp;&nbsp;&nbsp;
                            <button type="submit" class="btn btn-default">TÌM</button>
                        </form>
                    </center> 
                </div>
                <div class="danhsachgopy" >DANH SÁCH GÓP Ý</div>
                <table class="table">
                    <tr style="font-weight: bold"><td style="width: 120px">Trạng Thái</td><td>Chủ đề</td><td>Tạo lúc</td></tr>
                    <?php 
                        foreach ($chude as $value) {
                            echo '<tr>
                                    <td>';
                            if($value->codinh == '1') echo 'Cố định<BR>';
                            echo $value->nguoixem,'</td>',
                            '<td><a href="',base_url(),'gopy/chitietgopy?magopy=',$value->magopy,'" target="_blank">',$value->tieude,'</a></td>',
                            '<td>',$value->taoluc,'</td></tr>';
                        }
                    ?>
                </table>
            </div>